package de.pa2.proxy.config;

import java.util.ArrayList;

public class HostConfiguration {
	public static final String TAG = "host";
	private boolean acceptCookies = false;
	private ArrayList<String> domains = new ArrayList<String>();
	private ArrayList<String> urls = new ArrayList<String>();
	private String action;
	private ArrayList<Replacement> replacements = new ArrayList<Replacement>();

	public HostConfiguration(String domain, String action) {
		super();
		this.domains.add(domain);
		this.action = action;
	}

	public HostConfiguration() {
		super();
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String[] getDomains() {
		return domains.toArray(new String[] {});
	}

	public String[] getUrls() {
		return urls.toArray(new String[] {});
	}

	public void addDomain(String d) {
		domains.add(d);
	}

	public void addUrl(String d) {
		urls.add(d);
	}

	public void addReplacement(Replacement replacement) {
		this.replacements.add(replacement);
	}

	public Replacement[] getReplacements() {
		return replacements.toArray(new Replacement[] {});
	}

	public boolean isAcceptCookies() {
		return acceptCookies;
	}

	public void setAcceptCookies(boolean acceptCookies) {
		this.acceptCookies = acceptCookies;
	}

}
